import { BaseLoader } from "./BaseLoader";
import { FyMapInfo } from "../../../fyGame/fyMap/FyMapInfo";
//class MapDataLoader
    
    export  class MapDataLoader extends BaseLoader
    {
       

        public get mapInfo(): FyMapInfo
        {
            return this._mapInfo;
        }

        public /* override */ getClass(): Class
        {
            return MapDataLoader;
        }

        public /* override */ initialize(arg1): void
        {
            if (!(arg1 is flash.utils.ByteArray)) 
            {
                throw new Error("DataResource can only handle ByteArrays.");
            }
            var loc1=new FyMapInfo();
            loc1.read(arg1);
            this._mapInfo = loc1;
            if (resourceInfo) 
            {
                resourceInfo.data = this._mapInfo;
            }
            onLoadCompleteHandler();
            return;
        }

        protected /* override */ onContentReady(arg1): Boolean
        {
            return !(this._mapInfo == null);
        }

        private /* var */_mapInfo: FyMapInfo=null;
    }
